/*
 * Copyright (c) 2010-2013 Ruben Chakhmakhchyan. All rights reserved.
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Eclipse Public License
 * Version 1.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://opensource.org/licenses/EPL-1.0 and read it before using this file.
 */

#pragma once


#define PROTOCOL_UNKNOWN	0
#define PROTOCOL_HTTP		1
#define PROTOCOL_HTTPS		2
//#define PROTOCOL_FTP		3 // not implemented yet

#define URLTYPE_FULL		1
#define URLTYPE_RELATIVE	2
#define URLTYPE_ABSOLUTE	3

typedef struct URLDESCRIPTOR
{
    char type;
    int protocol;
    //ulong_t ip;
    char* host;
    //bool isIp;
    int port;
    char* path;
    //size_t pathObjectOffset;
} URLDESCRIPTOR;


class Url
{
public:

    static int Merge( URLDESCRIPTOR& urlDesc, char* url1, char* url2 );
};
